﻿using System;
using System.Data;
using System.Web;
using System.Web.UI.WebControls;
using Texfina.Core.Common;  
using Texfina.Core.Web;
using Texfina.Common.Mg;
using Texfina.Core.Data;  
using Texfina.Entity.Rh;
using RHBOQry = Texfina.BOQry.Rh;

namespace RH
{
   public partial class wfPerHistorial : SearchPage 
   {
      protected void Page_Load(object sender, EventArgs e)
      {
                       
         this.LoadInitialSettings();
         if(this.IsPostBack){
            this.LoadInPostBack();
            return;
         } 

         this.LoadData();
         SearchData();

      }

      public override void LoadInitialSettings()
      {
         Label lbl = (Label) this.Master.FindControl("lblTitle");
         lbl.Text = "Historial de Aprobaciones/Observaciones del Personal";
      }

      public override void SearchData()
      {

         EPerHistoAprob objE = new EPerHistoAprob();
         objE.IdEmpresa = Session[ConstSessionVar.EMPRESA].ToString();
         objE.IdPersonal = Request.QueryString["IdPersonal"].ToString();

         RHBOQry.IPersonal objBO = (RHBOQry.IPersonal)WCFHelper.GetObject<RHBOQry.IPersonal>(typeof(RHBOQry.Personal));
         DataTable dt = objBO.GetPerHistoAprob(objE);

         this.GridSetDataBinding(grdList, dt);

      }

   }
}